<template>
    <div class="app">
        <h3 ref='text'>我是App组件</h3>
        <h4>{{msg}}</h4>
        <button @click='showText'>点我提示h3标签中的内容></button>
    <Student />
    </div>
</template>

<script>
/* eslint-disable*/ 
    import Student from './components/Student'
    export default {
        name:'App',
        components:{
            Student
        },
        data(){
            return {
                msg:'欢迎学习Vue'
            }
        },
        methods:{
            showText(){
                console.log(this.$refs.text.innerText)
            }
        }
        // 获取ref属性的值得时候  需要this.$refs.xxx
    }
</script>

<style>
    .app{
        background-color: aqua;
        padding: 30px;
    }
</style>